package com.zhiyou100.servicrImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou100.mapper.registration.RegistrationMapper;
import com.zhiyou100.model.RegistrationInfor;
import com.zhiyou100.service.RegistrationService;
@Service
public class RegistrationServiceImpl implements RegistrationService{
	@Autowired
	private RegistrationMapper mapper;
	// 查询
	@Override
	public List<RegistrationInfor> findAll(Map<String, Object> map) {
		List<RegistrationInfor> list = mapper.findAll(map);
		return list;
	}
	// 详情
	@Override
	public RegistrationInfor findById(String medical_record) {
		RegistrationInfor ri = mapper.findById(medical_record);
		return ri;
	}
	// 退号
	@Override
	public void deleteById(String medical_record) {
		mapper.deleteById(medical_record);
		
	}
	// 更新  查询
	@Override
	public RegistrationInfor editById(String medical_record) {
		RegistrationInfor ri = mapper.editById(medical_record);
		return ri;
	}
	// 更新 更改
	@Override
	public void updata(RegistrationInfor ri) {
		System.out.println("serviceImpl层更新registration: "+ri);
		mapper.updata(ri);
		
	}
	// 添加
	@Override
	public void add(RegistrationInfor ri) {
		mapper.add(ri);
		
	}
	

}
